/*import Vue from 'vue';
import Router from 'vue-router';*/
const Home = resolve => require(['../components/common/home.vue'], resolve);
const dashboard = resolve => require(['../components/dashboard/index.vue'], resolve);
const taskHostConfig = resolve => require(['../components/page/taskHostConfig.vue'], resolve);
const taskHostStatus = resolve => require(['../components/page/taskHostStatus.vue'], resolve);
const taskCronerAlertConfig = resolve => require(['../components/page/taskCronerAlertConfig.vue'], resolve);
const taskCronerConfig = resolve => require(['../components/page/taskCronerConfig.vue'], resolve);
const taskCronerLog = resolve => require(['../components/page/taskCronerLog.vue'], resolve);
const taskRunnerConfig = resolve => require(['../components/page/taskRunnerConfig.vue'], resolve);
const taskRunnerAlertConfig = resolve => require(['../components/page/taskRunnerAlertConfig.vue'], resolve);
const taskRunnerLog = resolve => require(['../components/page/taskRunnerLog.vue'], resolve);
const taskAlertContact = resolve => require(['../components/page/taskAlertContact.vue'], resolve);
const taskAlertInfo = resolve => require(['../components/page/taskAlertInfo.vue'], resolve);
const taskAlertInfoNotify = resolve => require(['../components/page/taskAlertInfoNotify.vue'], resolve);
const login = resolve => require(['../components/page/login.vue'], resolve);

let routes =  [
        {
            path: '/',
            redirect: '/login',
            hidden: true
        },
        {

            path: '/dashboard',
            component: Home,
            children: [
                {
                    name: '首页',
                    path: 'dashboard',
                    component: dashboard,// 首页
                    hidden: true
                }
            ]
        },
        {
            path: '/taskHost',
            component: Home,
            redirect: '/taskHost/taskHostStatus',
            name: '主机管理',
            children: [
                {
                    name: '任务主机配置表',
                    path: 'taskHostConfig',
                    component: taskHostConfig // 任务主机配置表
                },
                {
                    name: '主机状态表',
                    path: 'taskHostStatus',
                    component: taskHostStatus // 主机状态表
                }
            ]
        },
        {
            path: '/taskCroner',
            component: Home,
            redirect: '/taskCroner/taskCronerLog',
            name: '定时任务管理',
            noDropdown: true,
            children: [
                {
                    name: '定时任务报警配置表',
                    path: 'taskCronerAlertConfig',
                    component: taskCronerAlertConfig // 定时任务报警配置表
                },
                {
                    name: '定时任务配置表',
                    path: 'taskCronerConfig',
                    component: taskCronerConfig // 定时任务配置表
                },
                {
                    name: '定时任务日志表',
                    path: 'taskCronerLog',
                    component: taskCronerLog // 定时任务日志表
                }
            ]
        },
        {
            path: '/taskRunner',
            component: Home,
            redirect: '/taskRunner/taskRunnerLog',
            name: '队列任务管理',
            noDropdown: true,
            children: [
                {
                    name: '主机运行配置表',
                    path: 'taskRunnerConfig',
                    component: taskRunnerConfig // 主机运行配置表
                },
                {
                    name: '任务报警配置运行表',
                    path: 'taskRunnerAlertConfig',
                    component: taskRunnerAlertConfig // 任务报警配置运行表
                },
                {
                    name: '任务运行日志表',
                    path: 'taskRunnerLog',
                    component: taskRunnerLog // 任务运行日志表
                },
            ]
        },
        {
            path: '/taskAlert',
            component: Home,
            redirect: '/taskAlert/taskAlertInfo',
            name: '监控和报警日志',
            noDropdown: true,
            children: [
                {
                    name: '报警联系人配置表',
                    path: 'taskAlertContact',
                    component: taskAlertContact // 报警联系人配置表
                },
                {
                    name: '报警发送信息表',
                    path: 'taskAlertInfo',
                    component: taskAlertInfo // 报警发送信息表
                },
                {
                    name: '定时任务信息通知表',
                    path: 'taskAlertInfoNotify',
                    component: taskAlertInfoNotify // 定时任务信息通知表
                }
            ]
        },
        {
            path: '/login',
            component: login
        },
    ];

export default routes;
